package com.suma.platform.core.enums;

/**
 * @author suma
 * @date 2018/1/11 上午9:31
 */
public enum ResultCode {

	/*------空对象,空值错误定义------*/
	NULL_OBJECT(
			"NULL_OBJECT", "对象为空"
	),
	OPENID_NULL(
			"OPENID_NULL", "openid不允许为空"
	),
	/*------业务错误信息定义------*/
	BIZ_ERROR_WECHAT_USER_INSERT(
			"BIZ_ERROR_WECHAT_USER_INSERT", "添加微信用户信息失败"
	),
	BIZ_ERROR_WECHAT_USER_UPDATE(
			"BIZ_ERROR_WECHAT_USER_UPDATE", "修改微信用户信息失败"
	),
	/*------系统错误信息定义------*/
	UNKNOWN_ERROR(
			"UNKNOWN_ERROR", "系统繁忙，请稍后再试..."
	),
	TOKEN_INVALID(
			"TOKEN_INVALID", "token不合法,请检查..."
	),
	SIGN_INVALID(
			"SIGN_INVALID", "sign不合法,请检查..."
	),
	OVER_TIME(
			"OVER_TIME", "请求超时,请检查..."
	);

	ResultCode(String code, String desc) {
		this.setCode(code);
		this.setDesc(desc);
	}

	private String code;
	private String desc;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
